package com.huang.api.factory;

import com.huang.api.service.UserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * 文件服务降级处理
 * 
 * @author huangzx
 */
@Component
public class UserServiceFallbackFactory implements FallbackFactory<UserService>
{
    private static final Logger log = LoggerFactory.getLogger(UserServiceFallbackFactory.class);


    @Override
    public UserService create(Throwable cause) {
        log.error(String.valueOf(cause));
        return null;
    }

}
